﻿<CustomWindow:PT_CustomWindow xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:CustomWindow="clr-namespace:OMANE.CustomWindow;assembly=OMANE.CustomWindow" xmlns:OMANE="clr-namespace:OMANE" xmlns:omaneui="clr-namespace:OMANE.Common.UI;assembly=OMANE.Common.UI" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero" x:Class="ViewMainWindow" 
    WindowStartupLocation="CenterScreen"
    mc:Ignorable="d"
    Title="OMANE" Background="{x:Null}" WindowStyle="None" omaneui:DragDropBinder.Command="{Binding DropFileCommand}" omaneui:DragDropBinder.Format="{x:Static DataFormats.FileDrop}" >

    <CustomWindow:PT_CustomWindow.Resources>
        <Color x:Key="CoulDefaultWindowTitleClaire"  A="255" R="125" G="42" B="166" />
        <BooleanToVisibilityConverter x:Key="bool2VisibilityConverter"/>
        <Storyboard x:Key="LoadingAnimation" AutoReverse="False" RepeatBehavior="Forever">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(TextElement.Foreground).(GradientBrush.GradientStops)[2].(GradientStop.Offset)" Storyboard.TargetName="textBlock">
                <EasingDoubleKeyFrame KeyTime="0" Value="0.05"/>
                <EasingDoubleKeyFrame KeyTime="0:0:4" Value="0.95"/>
            </DoubleAnimationUsingKeyFrames>
            <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(TextElement.Foreground).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="textBlock">
                <EasingColorKeyFrame KeyTime="0" Value="{StaticResource CoulDefaultWindowTitleClaire}"/>
            </ColorAnimationUsingKeyFrames>
            <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(TextElement.Foreground).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="textBlock">
                <EasingColorKeyFrame KeyTime="0" Value="{StaticResource CoulDefaultWindowTitleClaire}"/>
            </ColorAnimationUsingKeyFrames>
            <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(TextElement.Foreground).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="textBlock">
                <EasingColorKeyFrame KeyTime="0" Value="White"/>
            </ColorAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(TextElement.Foreground).(Brush.RelativeTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="textBlock">
                <EasingDoubleKeyFrame KeyTime="0" Value="90"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(TextElement.Foreground).(GradientBrush.GradientStops)[1].(GradientStop.Offset)" Storyboard.TargetName="textBlock">
                <EasingDoubleKeyFrame KeyTime="0" Value="0.1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:4" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(TextElement.Foreground).(GradientBrush.GradientStops)[0].(GradientStop.Offset)" Storyboard.TargetName="textBlock">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:4" Value="0.9"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="FadingAnimation">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="border">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0.5"/>
                <EasingDoubleKeyFrame KeyTime="0:0:2" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="border1">
                <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0.5"/>
                <EasingDoubleKeyFrame KeyTime="0:0:2" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="border1">
                <DiscreteObjectKeyFrame KeyTime="0">
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Visible</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
                <DiscreteObjectKeyFrame KeyTime="0:0:2">
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Collapsed</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
            </ObjectAnimationUsingKeyFrames>
        </Storyboard>
    	<Style x:Key="ButtonFermOngletStyle" TargetType="{x:Type Button}" BasedOn="{x:Null}">
    		<Setter Property="Template">
    			<Setter.Value>
    				<ControlTemplate TargetType="{x:Type Button}">
					<!-- On utilise un contrôle Grid en tant que racine, car on peut facilement ajouter de nouveaux éléments pour personnaliser le bouton. -->
    					<Grid x:Name="Grid">
							<Image Source="IconeFermTransp.png" Width="16" Margin="5,0,0,0"></Image>
    					</Grid>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    	</Style>
    </CustomWindow:PT_CustomWindow.Resources>

	<CustomWindow:PT_CustomWindow.Width>
		<Binding Mode="TwoWay" Path="WindowWidth" Source="{StaticResource VisualUserSettings}"/>
	</CustomWindow:PT_CustomWindow.Width>
	<CustomWindow:PT_CustomWindow.Height>
		<Binding Mode="TwoWay" Path="WindowHeight" Source="{StaticResource VisualUserSettings}"/>
	</CustomWindow:PT_CustomWindow.Height>

    <CustomWindow:PT_CustomWindow.TaskbarItemInfo>
        <TaskbarItemInfo Description="Omane is the best actuarial tool">
            <TaskbarItemInfo.ThumbButtonInfos>
                <ThumbButtonInfo Description="Another"/>
                <ThumbButtonInfo Description="just in time"/>
            </TaskbarItemInfo.ThumbButtonInfos>
        </TaskbarItemInfo>
    </CustomWindow:PT_CustomWindow.TaskbarItemInfo>

    <CustomWindow:PT_CustomWindow.Triggers>
        <EventTrigger RoutedEvent="FrameworkElement.Loaded">
            <BeginStoryboard x:Name="LoadingAnimation_BeginStoryboard" Storyboard="{StaticResource LoadingAnimation}"/>
        </EventTrigger>
    </CustomWindow:PT_CustomWindow.Triggers>

    <Grid>

        <!--<Window.DataContext>
        <OMANE:MainWindowViewModel />
    </Window.DataContext>-->
        <!--<Window.DataContext>
        <OMANE:MainWindowViewModel />
    </Window.DataContext>-->
        <!--<Window.DataContext>
        <OMANE:MainWindowViewModel />
    </Window.DataContext>-->
        <Border x:Name="border" BorderBrush="{DynamicResource BrushCouleur1Base}"  BorderThickness="1" Background="White" Opacity="0">
            <DockPanel Background="{StaticResource DegradeBckTitre}" x:Name="dckPanelOMANE">
                <Grid x:Name="GridTitle" DockPanel.Dock="Top">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="25"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                    <Rectangle Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" Fill="{StaticResource DegradeBckBarreTitre}" />
                    <StackPanel  Grid.Column="1"  Orientation="Horizontal" HorizontalAlignment="Right" Margin="5,0,0,0">
                        <CheckBox x:Name="BtnMaximizer"  VerticalAlignment="Top" Margin="0,0,5,0" ToolTip="Cliquez ici pour passer en mode plein ecran" />
                        <Border x:Name="WindowButtonsPlaceholder" HorizontalAlignment="Right"  VerticalAlignment="Top"    Margin="0,-1,10,0" />
                    </StackPanel>
                    <StackPanel Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center">
                        <TextBlock FontSize="16" Foreground="White" FontWeight="Normal" Margin="7,0,0,0"><Run Text="OMANE"/></TextBlock>
                        <TextBlock Foreground="White" Margin="5,0,0,0"/>
                    </StackPanel>
                </Grid>
                <Menu  ItemsSource="{Binding ViewModelMainMenu.Children}" Padding="0,1,0,0" DockPanel.Dock="Top" Height="Auto" x:Name="MenuOMANE">
                    <Menu.Style>
                        <Style TargetType="{x:Type Menu}" BasedOn="{StaticResource controlOMANE}" >
                            <Setter Property="Background" Value="{StaticResource BrushCouleur1BckClaire}"/>
                            <Setter Property="FontWeight" Value="Regular"/>
                        </Style>
                    </Menu.Style>
                    <Menu.ItemContainerStyle>
                        <Style TargetType="{x:Type MenuItem}" BasedOn="{StaticResource controlOMANE}" >
                            <Setter Property="Command" Value="{Binding Command}"/>
                            <Setter Property="CommandParameter" Value="{Binding}"/>
                        </Style>
                    </Menu.ItemContainerStyle>
                    <Menu.ItemTemplate>
                        <HierarchicalDataTemplate ItemsSource="{Binding Children}">
                            <TextBlock Text="{Binding Title}"/>
                        </HierarchicalDataTemplate>
                    </Menu.ItemTemplate>
                </Menu>
                <Grid x:Name="GridPrincipale">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition x:Name="TreeViewColumn" Width="{Binding SplitterY, Mode=TwoWay, Source={StaticResource VisualUserSettings}}" MinWidth="200" MaxWidth="500" />
                        <ColumnDefinition Width="5" />
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*" />
                        <RowDefinition Height="5" />
                    </Grid.RowDefinitions>
                    <Rectangle Grid.ColumnSpan="3" Grid.RowSpan="2" Fill="{StaticResource DegradeBckFenetre}" />
                    <Thumb
                        x:Name="Thumb_DragSize"
                        Grid.ColumnSpan="3" 
    					Grid.Row="1"
                        DragDelta="Thumb_DragDelta"
    					HorizontalAlignment="Right" 
    					DockPanel.Dock="Bottom"
    					Cursor="SizeNWSE"
    					Height="5" />
                    <GridSplitter
    					Grid.Column="1" 
    					HorizontalAlignment="Stretch" 
    					VerticalAlignment="Stretch" 
    					Background="Transparent" />
                    <Grid Grid.Column="0">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" MinHeight="75">
                                
                                <RowDefinition.MaxHeight>
                                    <Binding ElementName="MenuListBox" Path="Items.Count" >
                                        <Binding.Converter>
                                            <OMANE:MaxHeightCalculator Factor="35" Constant="75" />
                                        </Binding.Converter>
                                    </Binding>
                                </RowDefinition.MaxHeight>
                                
                            </RowDefinition>
                        </Grid.RowDefinitions>
                        <GridSplitter Grid.Row="1"
    						DragIncrement="35"
    						VerticalContentAlignment="Top"
    						VerticalAlignment="Top" 
    						HorizontalAlignment="Stretch" 
    						Height="5" 
    						Background="Transparent" 
                                  />
                        <DockPanel Grid.Row="0"  Margin="5,0,0,0" >
                            <Grid DockPanel.Dock="Top">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>

                                <Label Style="{DynamicResource OMANE_labelTitre}" Grid.ColumnSpan="2"  Content="Arborescence"  />
                                <StackPanel Orientation="Horizontal" Grid.Column="1" Margin="0,0,5,0" >
                                    <Button 
    									x:Name="TreeviewExpandAllButton" 
    									Content="+" 
    									Margin="0,0,1,0" 
    									Background="#00000000" 
    									BorderBrush="{x:Null}" 
    									BorderThickness="0" 
    									Padding="0" 
    									Width="15" 
    									VerticalAlignment="Center"
    									Click="TreeviewExpandAllButton_Click"/>
                                    <Button 
    									x:Name="TreeviewCloseAllButton" 
    									Content="-" 
    									Margin="1,0,0,0" 
    									Background="#00000000" 
    									BorderBrush="{x:Null}" 
    									BorderThickness="0" 
    									Padding="0" 
    									Width="15" 
    									VerticalAlignment="Center" 
    									Click="TreeviewCloseAllButton_Click"/>
                                </StackPanel>
                            </Grid>
                            <TreeView x:Name="MenuTreeView" BorderThickness="1,0,1,1" ItemsSource="{Binding V2ViewModelAccordeonMenu/Body}" ItemContainerStyle="{DynamicResource TreeViewItemStyle1}" >
                                <TreeView.Resources>
                                    <Style x:Key="TreeViewItemFocusVisual">
                                        <Setter Property="Control.Template">
                                            <Setter.Value>
                                                <ControlTemplate>
                                                    <Rectangle/>
                                                </ControlTemplate>
                                            </Setter.Value>
                                        </Setter>
                                    </Style>
                                    <PathGeometry x:Key="TreeArrow" Figures="M0,0 L0,6 L6,0 z"/>
                                    <Style x:Key="ExpandCollapseToggleStyle" TargetType="{x:Type ToggleButton}">
                                        <Setter Property="Focusable" Value="False"/>
                                        <Setter Property="Width" Value="16"/>
                                        <Setter Property="Height" Value="16"/>
                                        <Setter Property="Template">
                                            <Setter.Value>
                                                <ControlTemplate TargetType="{x:Type ToggleButton}">
                                                    <Border Background="Transparent" Height="16" Padding="5,5,5,5" Width="16">
                                                        <Path x:Name="ExpandPath" Data="{StaticResource TreeArrow}" Fill="Transparent" Stroke="#FF989898">
                                                            <Path.RenderTransform>
                                                                <RotateTransform Angle="135" CenterY="3" CenterX="3"/>
                                                            </Path.RenderTransform>
                                                        </Path>
                                                    </Border>
                                                    <ControlTemplate.Triggers>
                                                        <Trigger Property="IsMouseOver" Value="True">
                                                            <Setter Property="Stroke" TargetName="ExpandPath" Value="#FF1BBBFA"/>
                                                            <Setter Property="Fill" TargetName="ExpandPath" Value="Transparent"/>
                                                        </Trigger>
                                                        <Trigger Property="IsChecked" Value="True">
                                                            <Setter Property="RenderTransform" TargetName="ExpandPath">
                                                                <Setter.Value>
                                                                    <RotateTransform Angle="180" CenterY="3" CenterX="3"/>
                                                                </Setter.Value>
                                                            </Setter>
                                                            <Setter Property="Fill" TargetName="ExpandPath" Value="#FF595959"/>
                                                            <Setter Property="Stroke" TargetName="ExpandPath" Value="#FF262626"/>
                                                        </Trigger>
                                                    </ControlTemplate.Triggers>
                                                </ControlTemplate>
                                            </Setter.Value>
                                        </Setter>
                                    </Style>
                                    <Style x:Key="TreeViewItemStyle1" TargetType="{x:Type TreeViewItem}">
                                        <Setter Property="Background" Value="Transparent"/>
                                        <Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
                                        <Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
                                        <Setter Property="Padding" Value="1,0,0,0"/>
                                        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
                                        <Setter Property="FocusVisualStyle" Value="{StaticResource TreeViewItemFocusVisual}"/>
                                        <Setter Property="IsExpanded" Value="{Binding Extras.Visible, Mode=TwoWay}" />
                                        <Setter Property="IsSelected" Value="{Binding Extras.Selected, Mode=TwoWay}" />
                                       
									    <Setter Property="Template">
                                            <Setter.Value>
                                                <ControlTemplate TargetType="{x:Type TreeViewItem}">
                                                    <Grid>
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition MinWidth="19" Width="Auto"/>
                                                            <ColumnDefinition Width="Auto"/>
                                                            <ColumnDefinition Width="*"/>
                                                        </Grid.ColumnDefinitions>
                                                        <Grid.RowDefinitions>
                                                            <RowDefinition Height="Auto"/>
                                                            <RowDefinition/>
                                                        </Grid.RowDefinitions>
                                                        <ToggleButton x:Name="Expander" ClickMode="Press" IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ExpandCollapseToggleStyle}"/>
                                                        <Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.Column="1" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
                                                            <ContentPresenter x:Name="PART_Header" ContentSource="Header" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                                                        </Border>
                                                        <ItemsPresenter x:Name="ItemsHost" Grid.ColumnSpan="2" Grid.Column="1" Grid.Row="1"/>
                                                    </Grid>
                                                    <ControlTemplate.Triggers>
                                                        <Trigger Property="IsExpanded" Value="false">
                                                            <Setter Property="Visibility" TargetName="ItemsHost" Value="Collapsed"/>
                                                        </Trigger>
                                                        <Trigger Property="HasItems" Value="false">
                                                            <Setter Property="Visibility" TargetName="Expander" Value="Hidden"/>
                                                        </Trigger>
                                                        <Trigger Property="IsEnabled" Value="false">
                                                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                                                        </Trigger>
                                                    </ControlTemplate.Triggers>
                                                </ControlTemplate>
                                            </Setter.Value>
                                        </Setter>
									    <Setter Property="ContextMenu">
									    	<Setter.Value>
									    		<ContextMenu AlternationCount="1" ItemsSource="{Binding ContextualCommands, Mode=OneWay}" DisplayMemberPath="DisplayName" HasDropShadow="True" >
									    			<ContextMenu.ItemContainerStyle>
									    				<Style TargetType="{x:Type MenuItem}">
									    					<Setter Property="Command" Value="{Binding Command}" />		
														</Style>			
													</ContextMenu.ItemContainerStyle>									    			 		
												</ContextMenu>
									    	</Setter.Value>
									    </Setter>
                                    </Style>
                                </TreeView.Resources>
                                <TreeView.Style>
                                    <Style TargetType="{x:Type TreeView}" BasedOn="{StaticResource controlOMANE}">
                                        <Setter Property="FontWeight" Value="Regular"/>
                                        <Setter Property="Foreground" Value="{StaticResource BrushCouleur1BaseFonce}"/>
                                        <Setter Property="BorderBrush" Value="{StaticResource BrushCouleur1Base}"/>
                                    </Style>
                                </TreeView.Style>

                                <TreeView.ItemTemplate>
                                    <HierarchicalDataTemplate ItemsSource="{Binding Children}">
                                        <StackPanel x:Name="stackPanel" Cursor="Hand"  Margin="4" Orientation="Horizontal">
                                            <Image Source="{Binding Icone, Converter={StaticResource StringToIconConverter}}" />
                                            <TextBlock x:Name="textBlock" Margin="5,0,0,0" Text="{Binding Title}" Foreground="#FF337DF5" TextDecorations="Underline" />
                                        </StackPanel>
                                        <HierarchicalDataTemplate.Triggers>
                                            <Trigger Property="IsMouseOver" Value="True">
                                                <Setter TargetName="textBlock" Property="FontWeight" Value="Bold"/>
                                            </Trigger>
                                        </HierarchicalDataTemplate.Triggers>
                                    </HierarchicalDataTemplate>
                                </TreeView.ItemTemplate>
                            </TreeView>
                        </DockPanel>
                        <Grid Grid.Row="1" MinHeight="75">
                            <Grid.RowDefinitions>
                                <RowDefinition />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <ListBox 
    							x:Name="MenuListBox"
    							Grid.Row="0"
    							Margin="5,5,0,0" 
    							Padding="0"
    							Background="{DynamicResource BrushCouleur1Base}"
    							ItemsSource="{Binding V2ViewModelAccordeonMenu}"  
    							IsSynchronizedWithCurrentItem="True"
    							ScrollViewer.HorizontalScrollBarVisibility="Disabled" 
    							ScrollViewer.VerticalScrollBarVisibility="Disabled"
    							BorderBrush="{x:Null}"
    							BorderThickness="0" HorizontalContentAlignment="Stretch" 
    							VerticalContentAlignment="Stretch" Cursor="Hand">
                                <ListBox.Template>
                                    <ControlTemplate TargetType="{x:Type ListBox}">
                                        <Grid>
                                            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                            <ScrollViewer  Focusable="false" Background="{TemplateBinding Background}">
                                                <StackPanel IsItemsHost="true" Margin="0"/>
                                            </ScrollViewer>
                                        </Grid>
                                    </ControlTemplate>
                                </ListBox.Template>
                                <ListBox.ItemContainerStyle>
                                    <Style TargetType="{x:Type ListBoxItem}">
                                        <Setter Property="BorderThickness" Value="0"/>
                                        <Setter Property="Padding" Value="0" />
                                        <Setter Property="Margin" Value="0" />
                                        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
                                        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
                                        <Setter Property="HorizontalAlignment" Value="Stretch"/>
                                        <Setter Property="VerticalAlignment" Value="Stretch"/>
                                    </Style>
                                </ListBox.ItemContainerStyle>
                                <ListBox.ItemTemplate >
                                    <DataTemplate>
                                        <Grid>
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="Auto" />
                                                <ColumnDefinition />
                                            </Grid.ColumnDefinitions>

                                            <RadioButton 
    											IsChecked="{Binding IsSelected, RelativeSource={RelativeSource AncestorType={x:Type ListBoxItem}}}" 
    											Content="{Binding Header}" 
    											Height="35"
    											Margin="0"
    											Foreground="Black"
    											Grid.Column="0"
    											Grid.ColumnSpan="2" FontSize="16" FontWeight="Bold" FontFamily="Calibri" VerticalContentAlignment="Center">
                                                <RadioButton.Template>
                                                    <ControlTemplate TargetType="{x:Type RadioButton}">
                                                        <Border
    														x:Name="Border"
    														CornerRadius="0"
    														BorderThickness="1,1,1,0"
    														Background="{StaticResource DegradeBckTitre}"
    														BorderBrush="{StaticResource BrushCouleur1Base}">
                                                            <ContentPresenter Margin="40,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center" RecognizesAccessKey="True" />
                                                        </Border>
                                                        <ControlTemplate.Triggers>
                                                            <Trigger Property="IsMouseOver" Value="True">
                                                                <Setter TargetName="Border"  Property="Background" Value="{StaticResource DegradeDefautMouseOver}" />
                                                                <Setter Property="Foreground" Value="{StaticResource BrushDefautMouseOverForeground}" />
                                                            </Trigger>
                                                            <Trigger Property="IsChecked" Value="True">
                                                                <Setter TargetName="Border"  Property="Background" Value="{DynamicResource DegradeDefaultSelected}" />
                                                                <Setter Property="Foreground" Value="{StaticResource BrushDefautSelectedForeground}" />
                                                            </Trigger>
                                                        </ControlTemplate.Triggers>
                                                    </ControlTemplate>
                                                </RadioButton.Template>

                                            </RadioButton>
                                            <Image 
    											HorizontalAlignment="Stretch"
    											VerticalAlignment="Stretch"
    											Margin="4"
    											Width="{Binding ActualHeight, RelativeSource={RelativeSource Mode=Self}}"  
    											Source="{Binding Icone, Converter={StaticResource StringToIconConverter}}" 
    											Stretch="Fill" StretchDirection="Both" />
                                        </Grid>
                                    </DataTemplate>
                                </ListBox.ItemTemplate>
                            </ListBox>
                            <ListBox   
    							Height="35"
    							x:Name="PreviewMenuListBox" 
    							Grid.Row="1"
    							Background="{StaticResource DegradeBckTitre}"
    							ItemsSource="{Binding V2ViewModelAccordeonMenu}"  
    							IsSynchronizedWithCurrentItem="True"
    							Margin="5,0,0,0"
    							HorizontalContentAlignment="Stretch"
    							VerticalContentAlignment="Stretch"
    							ScrollViewer.HorizontalScrollBarVisibility="Disabled" 
    							ScrollViewer.VerticalScrollBarVisibility="Disabled" BorderBrush="{DynamicResource BrushCouleur1Base}" BorderThickness="1">

                                <ListBox.ItemsPanel>
                                    <ItemsPanelTemplate>
                                        <StackPanel Orientation="Horizontal" FlowDirection="RightToLeft" IsItemsHost="True" Margin="2,0,0,0" />
                                    </ItemsPanelTemplate>
                                </ListBox.ItemsPanel>
                                <ListBox.ItemContainerStyle>
                                    <Style TargetType="{x:Type ListBoxItem}">
                                        <Setter Property="Padding" Value="0" />
                                        <Setter Property="Margin" Value="0" />
                                        <Setter Property="VerticalAlignment" Value="Center"/>
                                        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
                                        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
                                    </Style>
                                </ListBox.ItemContainerStyle>
                                <ListBox.ItemTemplate >
                                    <DataTemplate>
                                        <Image
    										Margin="1"
    										Width="20"  
    										Height="20"
    										Source="{Binding Icone, Converter={StaticResource StringToIconConverter}}" />
                                    </DataTemplate>
                                </ListBox.ItemTemplate>
                            </ListBox>
                        </Grid>
                    </Grid>
                    <Grid Grid.Column="2" Margin="0,0,5,0" >
                        <Grid.RowDefinitions>
                            <RowDefinition Height="41" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>
                        <TabControl Margin="0,10,0,0" 
    						Grid.Row="1"
    						Style="{StaticResource tbControlOMANE}"
    						DataContext="{Binding SelectedItem, ElementName=MenuTreeView, Mode=OneWay}"
    						ItemsSource="{Binding TabGroup, Mode=OneWay}"
    						ItemContainerStyle="{StaticResource tbControlItem}"
    						IsSynchronizedWithCurrentItem="True"
    						SelectedItem="{Binding TabSection, Mode=OneWay}" ScrollViewer.CanContentScroll="False">
                            <TabControl.ItemTemplate>
                                <DataTemplate>
                                    <StackPanel Orientation="Horizontal">
                                        <Image Source="{Binding Icone}" Margin="2,0,0,0" />
                                        <TextBlock Text="{Binding Title}" Margin="5,0,0,0" />
                                        <Button Visibility="{Binding IsClosable, Converter={StaticResource bool2VisibilityConverter}}" Command="{Binding CloseCommand}" Style="{DynamicResource ButtonFermOngletStyle}" Width="Auto"/>
                                    </StackPanel>
                                </DataTemplate>
                            </TabControl.ItemTemplate>
                        </TabControl>
                        <Grid Grid.Row="0">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="130" />
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>
                            <ContentControl  Grid.Column="0" Content="{StaticResource logoNAseul}" />
                            <ContentControl  Grid.Column="1" Content="{StaticResource visuelseul}" />
                            
                        </Grid>
                    </Grid>
                </Grid>
            </DockPanel>
        </Border>
        <Border x:Name="border1" BorderBrush="{DynamicResource BrushCouleur1Base}" Background="{DynamicResource DegradeBckTitre}" Width="500" Height="250" BorderThickness="15,15,15,14" CornerRadius="30" >
            <Grid>
            	<TextBlock VerticalAlignment="Bottom" HorizontalAlignment="Right" Text="V3.0" Margin="0,0,24,16" FontSize="18.667" FontWeight="Bold" />
                <TextBlock Visibility="Visible" x:Name="textBlock" TextWrapping="Wrap" Text="OMAN.e" FontSize="96" FontFamily="Calibri" HorizontalAlignment="Center" VerticalAlignment="Center" FontWeight="Bold">
    				<TextBlock.Effect>
    					<DropShadowEffect BlurRadius="8" Direction="291" ShadowDepth="8"/>
    				</TextBlock.Effect>
    	<TextBlock.Foreground>
    		<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
    			<LinearGradientBrush.RelativeTransform>
    				<TransformGroup>
    					<ScaleTransform CenterY="0.5" CenterX="0.5"/>
    					<SkewTransform CenterY="0.5" CenterX="0.5"/>
    					<RotateTransform CenterY="0.5" CenterX="0.5"/>
    					<TranslateTransform/>
    				</TransformGroup>
    			</LinearGradientBrush.RelativeTransform>
    			<GradientStop Color="#FFCEFF00" Offset="0"/>
    			<GradientStop Color="#FFF1FF00" Offset="1"/>
    			
    			<GradientStop Color="Red"  Offset="0.441"/>
    		</LinearGradientBrush>
    	</TextBlock.Foreground>
                </TextBlock>
                <Path x:Name="textBlock_Copy" Data="M42.421875,39.658333 C41.515625,41.002087 40.828125,42.423962 40.359375,43.923958 39.890625,45.423962 39.65625,46.955212 39.65625,48.517708 39.65625,51.330208 40.726563,53.759895 42.867188,55.80677 45.007813,57.853645 47.546875,58.877083 50.484375,58.877083 52.796871,58.877083 54.992184,58.252083 57.070313,57.002083 59.148434,55.752083 60.640621,54.158333 61.546875,52.220833 59.296871,48.345837 56.539059,45.330212 53.273438,43.173958 50.007809,41.017712 46.390621,39.845837&#xa;42.421875,39.658333 z M43.21875,28.220833 C46.906246,28.220833 50.351559,28.68177 53.554688,29.603645 56.757809,30.52552 59.703121,31.892708 62.390625,33.705208 67.203125,36.955212 71.015625,41.322399 73.828125,46.80677 76.640625,52.291145 78.046875,58.064583 78.046875,64.127083 78.046875,67.502083 77.625,70.65052 76.78125,73.572395 75.9375,76.49427 74.65625,79.205208 72.9375,81.705208 69.3125,87.017708 64.328125,91.24427 57.984375,94.384895 51.640621,97.52552 44.921871,99.095833&#xa;37.828125,99.095833 34.046875,99.095833 30.492186,98.611458 27.164063,97.642708 23.835938,96.673958 20.765625,95.236458 17.953125,93.330208 12.953125,89.955208 9.078125,85.74427 6.328125,80.697395 3.578125,75.65052 2.203125,70.205208 2.203125,64.361458 2.203125,59.892708 3.0625,55.642708 4.7812505,51.611458 6.4999995,47.580212 9,43.955212 12.281249,40.736458 16.3125,36.736462 21.007813,33.650524 26.367188,31.478645 31.726561,29.30677&#xa;37.34375,28.220833 43.21875,28.220833 z M128.53125,27.845833 L134.48438,53.486458 140.15625,30.658333 183.04688,33.142708 170.10938,37.642708 175.5,89.205208 187.96875,96.330208 131.53125,94.314583 141.79688,88.548958 150.79688,46.877083 129.89063,81.330208 111.9375,42.845833 119.10938,92.861458 134.20313,99.845833 81.421875,95.158333 89.484375,90.564583 94.828125,37.923958 84.28125,33.236458 z M227.90729,41.486458 L221.57916,64.548958 234.42291,60.189583 z M198.51666,27.658333 L253.64166,29.486458 240.79791,34.080208 263.34479,84.423958 272.25104,87.095833 231.37604,99.752083 241.82916,85.736458 238.87604,75.377083 223.68854,76.548958 219.28229,88.642708 225.89166,93.798958 181.45416,96.986458 192.28229,88.923958 206.67291,32.955208 z M307.31418,27.939583 L331.40793,80.392708 327.18918,34.877083 319.59543,29.767708 358.97043,33.517708 351.65793,36.705208 344.15793,91.595833 354.75168,95.814583 330.23605,97.736458 296.11086,54.205306 307.87668,93.236458 320.25168,100.03333 267.93918,95.158333 275.90793,89.767708 279.28293,38.111458 267.93918,33.517708 z M426.04999,27.377083 L430.64374,48.892708 423.00311,41.017708 400.40936,41.111458 396.98749,55.408333 413.11249,51.658333 417.89374,44.298958 419.72186,76.736458 414.61249,68.673958 400.31561,66.752083 394.64374,81.986458 421.54999,85.361458 434.01874,68.392708 429.79999,99.377083 352.59686,96.002083 372.89374,88.923958 365.67499,37.455208 352.59686,32.392708 z" HorizontalAlignment="Center" Height="72.657" RenderTransformOrigin="0.5,0.5" Stretch="Fill" VerticalAlignment="Center" Width="431.816" Visibility="Collapsed">
                    <Path.Effect>
                        <DropShadowEffect/>
                    </Path.Effect>
                    <Path.Fill>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <LinearGradientBrush.RelativeTransform>
                                <TransformGroup>
                                    <ScaleTransform CenterY="0.5" CenterX="0.5"/>
                                    <SkewTransform CenterY="0.5" CenterX="0.5"/>
                                    <RotateTransform CenterY="0.5" CenterX="0.5"/>
                                    <TranslateTransform/>
                                </TransformGroup>
                            </LinearGradientBrush.RelativeTransform>
                            <GradientStop Color="#FFCEFF00" Offset="0"/>
                            <GradientStop Color="#FFF1FF00" Offset="1"/>
                            <GradientStop Color="Red" Offset="0.441"/>
                        </LinearGradientBrush>
                    </Path.Fill>
                    <Path.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform/>
                            <SkewTransform/>
                            <RotateTransform/>
                            <TranslateTransform/>
                        </TransformGroup>
                    </Path.RenderTransform>
                </Path>
                <Rectangle HorizontalAlignment="Left" VerticalAlignment="Top" Width="129" Height="45" Margin="18,14,0,0">
                    <Rectangle.Fill>
                        <ImageBrush	
			ImageSource="pack://application:,,,/OMANE.Common.UI.Theme;component/Images/logo NA seul.jpg"
    />
                    </Rectangle.Fill>
                </Rectangle>

            </Grid>
        </Border>

    </Grid>

</CustomWindow:PT_CustomWindow>
